﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多种样式的社交网站顶部导航</title>


    @include("frontend/bootstrap/common/css")
    
    <style>
        /* 通用样式 */
        body {
            margin: 0;
            padding: 0;
            font-family: 'Inter', system-ui, sans-serif;
            line-height: 1.6;
        }

        .header-title {
            padding: 1rem;
            background-color: #f8f9fa;
            border-bottom: 1px solid #e9ecef;
            font-weight: 600;
            color: #333;
        }
    </style>
</head>
<body>

<h1 class="container text-center mb-5">多种样式的社交网站顶部导航</h1>

<!-- 第一套样式：经典蓝色 -->
<div class="container header-title">样式一：经典蓝色风格</div>
@include("frontend/bootstrap/common/header1")


<!-- 第二套样式：现代深色 -->
<div class="container header-title">样式二：现代深色风格</div>
@include("frontend/bootstrap/common/header2")

<!-- 第三套样式：活力橙色 -->
<div class="container header-title">样式三：活力橙色风格</div>
@include("frontend/bootstrap/common/header3")


<!-- 第四套样式：简约灰色 -->
<div class="container header-title">样式四：简约灰色风格</div>
@include("frontend/bootstrap/common/header4")


<script>
	// 为每个样式的登录按钮添加事件
	for (let i = 1; i <= 4; i++) {
		document.querySelector(`#guest-actions-${i} .login-btn`).addEventListener('click', function (e) {
			e.preventDefault();
			document.getElementById(`guest-actions-${i}`).style.display = 'none';
			document.getElementById(`user-actions-${i}`).style.display = 'flex';
		});
	}

	// 注销按钮事件
	document.querySelectorAll('.logout-btn').forEach(btn => {
		btn.addEventListener('click', function (e) {
			e.preventDefault();
			const target = this.getAttribute('data-target');
			document.getElementById(`user-actions-${target}`).style.display = 'none';
			document.getElementById(`guest-actions-${target}`).style.display = 'flex';
		});
	});

</script>

</body>
</html>

